﻿using System;
using System.Collections.Generic;
using GameFramework.Battle.Core;
using Gameplay.PVE.Utils;
using RootMotion.FinalIK;
using UnityEngine;

namespace Gameplay.PVE.Survivor
{
    public class ImmunityElement: ElementBase
    {
        public override void Execute()
        {
            if (config.sub_type == (int)EBattleElementSubType.Uncontrollable)
            {
                target.uncontrollable++;
            }
        }
        
        public override void OnFree()
        {
            if (config.sub_type == (int)EBattleElementSubType.Uncontrollable)
            {
                target.uncontrollable--;
            }
        }

        public override bool IsImmediate()
        {
            return false;
        }
    }
}
